<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://java.sun.com/jsf/composite">

    <h:head>
        <f:facet name="first">
            <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
        </f:facet>
    </h:head>

    <composite:interface>
        <composite:attribute name="guiaValue" type="pe.com.cotelasa.scp.entidad.GuiaRemision" />
    </composite:interface>

    <composite:implementation>

        <p:messages id="msgs" showDetail="false" autoUpdate="true"
                    closable="true" globalOnly="true" />

        <p:outputPanel>
            <p:commandButton id="btnAddArticulos" value="Agregar Articulos" disabled="#{BKCompAddArticuloStock.activarAgregar}"
                             icon="ui-icon-plus" immediate="true" update="pnlFindOrden" process="@this"
                             actionListener="#{MBCompAddArticuloStock.cargarArticulosPorSede}"
                             ajax="true" oncomplete="#{cc.id}.show()" style="font-size:10px;">
                <f:attribute name="guiaID" value="#{cc.attrs.guiaValue}" />  
                <f:attribute name="dialogName" value="#{cc.id}" /> 
                <f:attribute name="update" value=":formGuia:dataTablaArticulos :formGuia:btnGenerarGuiaRemision" /> 
            </p:commandButton>
        </p:outputPanel>

        <p:dialog id="idFindOrden" header="Lista de Articulos" showEffect="explode"
                  widgetVar="#{cc.id}" modal="true" maximizable="true">
            <ui:include src="#{MBCompAddArticuloStock.buscarDireccion(cc.attrs.guiaValue)}" />

        </p:dialog>



    </composite:implementation>

</html>